{% extends "main/base.html" %}
{% block siteinfo %}
<div class="uk-section section-hero">
    <div class="uk-container uk-text-center">
        <h1 class="uk-heading-hero">
            {{ setting.notice }}
        </h1>
        <p class="subtitle uk-text-uppercase">
            {{ setting.subtitle }}
        </p>
        <div class="uk-article-meta font-smoothing">
        </div>
    </div>
</div>
{% endblock %}
{% block content %}
<main class="uk-dark" aria-label="Content">
    <div class="uk-container uk-container-small">
    {% for article in articles %}
        <article class="uk-article">
            <h2 class="uk-article-title">
                <a href="{{ article.link }}">
                    {{ article.title | truncate(length=41) | safe }}
                </a>
            </h2>
            <div class="uk-article-excerpt">
                <p>
                    {{ nohtml(article.content) | truncate(length=300) }}
                </p>
            </div>
        </article>
        {% endfor %}
        <ul class="uk-pagination uk-text-uppercase uk-margin-large-top">
        {% if pagination.has_prev %}
            <li><a class="prev" href="{{ request.path }}?page={{ pagination.prev_num }}">上一页</a></li>
        {% endif %}
        {% if pagination.has_next %}
            <li class="uk-margin-auto-left"><a class="next" title="" href="{{ request.path }}?page={{ pagination.next_num }}">下一页</a></li>
        {% endif %}
        </ul>
    </div>
</main>
{% endblock %}